<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">
    var arr = [18, 45, 0, 58, 32,59];
    alert(paixu(arr));
    function paixu(arr) {
        return   arr.sort();
    }

</script>
</body>
</html>